/* ========================================================
   Brain AVM — Disease Landing Page
   Palette: cool gray + white, near-black bronze ink
   Type:    Fraunces · Newsreader · IBM Plex Mono
   ======================================================== */

:root {
  /* layout */
  --header-h: 64px;
  --sticky-h: 160px; /* masthead + chapter nav; updated from JS on load/resize */

  /* backgrounds */
  --bg:           #e2e0dd;   /* cool gray — main */
  --bg-deep:      #d6d3ce;   /* slightly deeper for separation */
  --bg-white:     #ffffff;   /* structural white */
  --bg-warm:      #efece6;   /* visual blocks that match the inner-iframe palette */
  --bg-dark:      #1a1714;   /* near-black with bronze undertone */

  /* text */
  --ink:          #1a1714;
  --ink-mid:      #2e2923;
  --ink-light:    #5c5146;
  --patina:       #7a6e60;
  --patina-light: #9c8e7d;

  /* rules + accent */
  --rule:         #c5beb1;
  --rule-soft:    #d7d2c8;
  --rule-onwhite: #e5e1d8;
  --accent:       #8b4d3a;   /* used very sparingly */

  /* type stacks */
  --serif:   'Fraunces', Georgia, 'Times New Roman', serif;
  --read:    'Newsreader', Georgia, serif;
  --mono:    'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* layout (cont.) */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max:    1280px;
  --col-prose-max: 640px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Push scroll targets below the sticky masthead + chapter nav */
section[id],
.section[id],
[id^="y1"],
[id^="y2"] {
  scroll-margin-top: var(--sticky-h, 160px);
}
body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--read);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--ink); color: var(--bg); }

/* ========================================================
   TOP STRIP (contact + language switcher)
   ======================================================== */
.topstrip {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--ink-light);
}
.topstrip-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.topstrip-contact {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
  align-items: center;
}
.topstrip-contact a {
  color: var(--ink);
  transition: color .2s;
}
.topstrip-contact a:hover { color: var(--accent); }
.topstrip-address { color: var(--ink-light); }
.topstrip-lang {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}
.topstrip-lang a {
  color: var(--patina);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 0.15rem 0.2rem;
  transition: color .2s;
}
.topstrip-lang a:hover { color: var(--ink); }
.topstrip-lang a.active {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* ========================================================
   MASTHEAD
   ======================================================== */
.masthead {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-soft);
  position: sticky;
  top: 0;
  z-index: 60;
}
.masthead-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.95rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
  transition: opacity .2s;
}
.logo-link:hover { opacity: 0.85; }
.logo-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  flex-shrink: 0;
}
.logo-words { display: flex; flex-direction: column; gap: 0.1rem; }
.logo-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.0625rem;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.005em;
}
.logo-sub {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--patina);
}
.nav-wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.nav-cta {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  padding: 0.75rem 1.1rem;
  white-space: nowrap;
  transition: background .2s;
}
.nav-cta:hover { background: var(--accent); }

/* Hamburger (mobile only) — bars only, no chrome */
.nav-hamburger {
  display: none;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--ink);
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .25s, opacity .2s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu panel (slide-down) */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 1rem var(--gutter) 1.5rem;
  z-index: 59;
  box-shadow: 0 8px 20px -8px rgba(26,23,20,0.18);
}
.mobile-menu[data-open="true"] { display: block; }
.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0 0 1rem;
  padding: 0;
}
.mobile-menu-links a {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mid);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule-soft);
  display: block;
}
.mobile-menu-links li:last-child a { border-bottom: none; }
.mobile-menu-cta {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  padding: 0.85rem 1rem;
  display: block;
  text-align: center;
  margin-top: 0.5rem;
}

/* ========================================================
   HERO
   ======================================================== */
.hero {
  background: #deddd9;
  padding: 0 0 clamp(3rem, 7vw, 4.5rem);
  border-bottom: 1px solid var(--rule-soft);
}
.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.breadcrumb {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--patina);
  margin: 25px 0 10px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--patina); transition: color .2s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--patina-light); }
.breadcrumb .here { color: var(--ink); }

.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.8rem;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
.hero h1 .paren {
  font-style: italic;
  font-weight: 300;
  color: var(--patina);
  font-size: 0.78em;
}
.lede {
  font-family: var(--read);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-light);
  max-width: 36em;
  margin-bottom: 2.4rem;
  text-wrap: pretty;
}

.author-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 32rem;
  margin-bottom: 1.6rem;
}
.author-name {
  font-family: var(--read);
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--ink);
  margin: 0;
}
.author-name strong {
  font-weight: 500;
  color: var(--ink);
}
.author-date {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--patina);
  margin-top: 0.25rem;
}

.verify-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.verify-label {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--patina);
}
.verify-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.verify-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  border: 1px solid var(--rule);
  padding: 0.5rem 0.9rem 0.5rem 0.75rem;
  transition: background .2s, color .2s, border-color .2s;
}
.verify-btn img {
  width: 16px;
  height: 16px;
  display: block;
  filter: grayscale(0.55) brightness(0.92);
  opacity: 0.95;
  transition: filter .25s, opacity .25s;
}
.verify-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.verify-btn:hover img {
  filter: none;
  opacity: 1;
}

/* Hero illustration */
.hero-art-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-warm);
  overflow: hidden;
  margin: 0;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
}
.hero-art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* ========================================================
   ARTICLE (prose column + sticky TOC)
   ======================================================== */
.article {
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(4rem, 8vw, 7rem);
  background: var(--bg);
  font-size: 1.0625rem;
}
.article-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.prose-column { min-width: 0; }

/* === Year label === */
/* Rendered as <h2> so screen-reader users can navigate the chronology
   by heading. Browser default font-size / weight / margin reset below. */
h2.year-label {
  font-size: 1rem;
  font-weight: 500;
  margin: clamp(4rem, 9vw, 7rem) auto 2.5rem;
  text-align: center;
}
.section:first-child .year-label { margin-top: 0; }
.year-label .year,
.year-label .city {
  display: block;
  font-family: var(--mono);
  text-transform: uppercase;
}
.year-label .year {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.22em;
  color: var(--ink);
}
.year-label .city {
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--patina);
  margin-top: 0.7rem;
}

/* === Prose blocks === */
.prose {
  max-width: var(--col-prose-max);
  margin: 0 auto;
}
.prose p {
  font-family: var(--read);
  font-weight: 400;
  font-size: 1.125rem; /* 18px */
  line-height: 1.65;
  color: var(--ink-mid);
  margin-bottom: 1.05rem;
  text-wrap: pretty;
}
.prose p:last-child { margin-bottom: 0; }
.prose em { font-style: italic; color: var(--ink-light); }
.prose strong { font-weight: 500; color: var(--ink); }
.prose em strong, .prose strong em { color: var(--ink); }

/* Inline TODO marker removed — was used for {bracketed} draft placeholders */

/* Article intro lede — standalone opening sentence above the first section */
.intro-lede {
  margin: 0 140px clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--rule-soft);
}
@media (max-width: 820px) {
  .intro-lede {
    margin-left: 10px;
    margin-right: 10px;
  }
}
.intro-lede .opener { margin: 0; }
.prose .opener {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 1.4rem;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 32;
  text-wrap: balance;
}

/* ========================================================
   Inline annotation — hoverable/tappable term with a footnote
   ======================================================== */
.annotation {
  position: relative;
  display: inline-block;
  cursor: help;
  outline: none;
  text-decoration: underline dotted var(--patina-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}
.annotation:hover,
.annotation:focus { text-decoration-color: var(--ink-mid); }
.annotation-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  padding: 0.85rem 1rem;
  font-family: var(--read);
  font-style: normal;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.55;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink-mid);
  width: 360px;
  max-width: calc(100vw - 40px);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 50;
}
.annotation-tip strong {
  font-weight: 500;
  color: var(--ink);
  display: block;
  margin-bottom: 0.4rem;
}
.annotation-tip em { font-style: italic; color: var(--ink); }
.annotation:hover .annotation-tip,
.annotation:focus .annotation-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  transition-delay: 0.15s, 0.15s;
}
@media (prefers-reduced-motion: reduce) {
  .annotation-tip { transition: none; }
}

/* ========================================================
   NEXT ON BRAIN AVM (inline one-liner inside article body)
   ======================================================== */
.next-on {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  text-align: left;
}
.prose .next-on:last-child { margin-bottom: 2.5rem; }
.next-on strong {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-right: 6px;
  vertical-align: 0.05em;
}
.next-on a {
  color: var(--ink);
  font-family: var(--read);
  font-size: 1rem;
  text-decoration: underline;
  text-decoration-color: var(--patina-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color .2s, color .2s;
}
.next-on a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.next-on .sep {
  color: var(--patina-light);
  margin: 0 5px;
}

.gene {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.04em;
  background: var(--bg-warm);
  padding: 0 0.3rem;
  font-size: 0.92em;
}

/* === Visual block === */
.visual {
  margin: clamp(1rem, 2.5vw, 2rem) 0;
  position: relative;
}
figure.visual figcaption {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--patina);
  margin-top: 0.9rem;
  text-align: center;
}
.figcap-tag {
  display: inline-block;
  margin-right: 0.7rem;
  color: var(--ink-mid);
  font-weight: 400;
  letter-spacing: 0.14em;
}
figure.visual figcaption em { font-style: italic; color: var(--patina); }

/* === Section variants === */
.section--prose-first .prose { margin-bottom: 0; }
.section--text-only .year-label { margin-bottom: 3rem; }
.section--text-only .prose { padding-bottom: 2rem; }

.section--text-only {
  padding: 0;
  margin-top: 0;
}

/* ========================================================
   TOC (sticky right column)
   ======================================================== */
.toc-sticky {
  position: sticky;
  top: calc(var(--header-h) + 7rem);
  padding-left: 1.5rem;
  border-left: 1px solid var(--rule);
}
.toc-title {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--patina);
  margin-bottom: 1.25rem;
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}
.toc-list a {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.25rem 0 0.25rem 0.55rem;
  border-left: 1px solid transparent;
  color: var(--patina);
  transition: color .25s, border-color .25s;
}
.toc-list a:hover { color: var(--ink); }
.toc-list a.active {
  color: var(--ink);
  border-left-color: var(--ink);
}
.toc-year {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: inherit;
}
.toc-loc {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--patina-light);
  text-wrap: balance;
}
.toc-list a.active .toc-loc { color: var(--patina); }

.toc-progress-label {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--patina-light);
  margin-bottom: 0.45rem;
}
.toc-progress-track {
  height: 1px;
  background: var(--rule-soft);
  position: relative;
}
.toc-progress-fill {
  position: absolute; inset: 0 auto 0 0;
  width: 0%;
  background: var(--ink);
  transition: width .15s linear;
}

/* ========================================================
   CHAPTER NAV (sticky horizontal, between hero and article)
   ======================================================== */
.chapter-nav {
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 55;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(1) blur(8px);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.chapter-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.chapter {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.05rem 1.4rem 1.05rem 0;
  color: var(--patina);
  border-left: 1px solid var(--rule-soft);
  transition: color .25s, background .25s;
  min-height: 70px;
}
.chapter:first-child { border-left: none; padding-left: 0; }
.chapter:not(:first-child) { padding-left: 1.4rem; }
.chapter:hover { color: var(--ink); }
.chapter:hover .chapter-num { color: var(--ink); }

.chapter-num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--patina-light);
  letter-spacing: 0.04em;
  min-width: 1.4em;
  text-align: left;
  font-variation-settings: "opsz" 36;
  transition: color .25s;
}
.chapter-meta { display: flex; flex-direction: column; gap: 0.18rem; min-width: 0; }
.chapter-title {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chapter-sub {
  font-family: var(--read);
  font-weight: 400;
  font-style: italic;
  font-size: 0.74rem;
  color: var(--patina-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter.is-active { color: var(--ink); }
.chapter.is-active .chapter-num { color: var(--ink); }
.chapter.is-active .chapter-sub { color: var(--patina); }
.chapter.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
}
.chapter:first-child.is-active::after { left: 0; }

/* ========================================================
   AUTHOR CARD (end of article)
   ======================================================== */
.author-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2rem;
  align-items: center;
  max-width: var(--col-prose-max);
  margin: 0 140px;
  padding: 25px 0 0;
  border-top: 1px solid var(--rule);
}
.author-portrait {
  display: block;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.author-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.65) contrast(0.98) brightness(1.02);
  transition: filter .4s ease;
}
.author-card:has(.author-more:hover) .author-portrait img,
.author-portrait:hover img {
  filter: grayscale(0) contrast(1);
}
.author-body { min-width: 0; }
.author-kicker {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.author-h {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.7rem;
  letter-spacing: -0.005em;
}
.author-bio {
  font-family: var(--read);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-light);
  margin-bottom: 0.9rem;
  max-width: 32em;
  text-wrap: pretty;
}
.author-more {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--read);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.05rem;
  transition: color .25s, border-color .25s;
}
.author-more span {
  transition: transform .25s ease;
  display: inline-block;
}
.author-more:hover span { transform: translateX(4px); }

/* RELATED — deprecated rules removed (block long since gone from HTML) */

/* ========================================================
   CTA
   ======================================================== */
.cta {
  background: var(--bg-dark);
  color: var(--bg-warm);
  padding: clamp(4rem, 9vw, 7rem) 0;
}
.cta-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: end;
}
.cta-kicker {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--patina);
  margin-bottom: 1.4rem;
}
.cta h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.05;
  color: var(--bg-warm);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.cta-lede {
  font-family: var(--read);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--patina-light);
  max-width: 32em;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: flex-start;
}
.cta-primary, .cta-secondary {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  transition: background .2s, color .2s;
  width: 100%;
  text-align: center;
}
.cta-primary {
  background: var(--bg-warm);
  color: var(--ink);
}
.cta-primary:hover { background: #fff; }
.cta-secondary {
  border: 1px solid var(--patina);
  color: var(--bg-warm);
}
.cta-secondary:hover {
  background: var(--patina);
  color: var(--ink);
}
.cta-meta {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--patina);
  margin-top: 0.7rem;
  width: 100%;
  text-align: center;
}

/* ========================================================
   FOOTER (matches reference site structure)
   ======================================================== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--rule-soft);
  padding: clamp(3.5rem, 6vw, 5rem) 0 2rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.footer-brand p {
  font-family: var(--read);
  font-weight: 400;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-light);
  max-width: 22rem;
}
.footer-col h4 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-col li a {
  font-family: var(--read);
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--ink-light);
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-col li a:hover { color: var(--ink); }
.footer-icon {
  display: inline-flex;
  width: 14px; height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}
.footer-icon svg { width: 100%; height: 100%; }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--patina);
}

/* ========================================================
   RESPONSIVE
   ======================================================== */
@media (max-width: 1180px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
  .toc-sticky { display: none; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: 0.58rem; letter-spacing: 0.12em; }
  /* Hero: cap headline so it doesn't fight the illustration column */
  .hero h1 { font-size: clamp(2.2rem, 4.4vw, 3rem); }
}

/* ----------------------------------------------------------
   Masthead / nav switches to hamburger here.
   ~960px is the width where logo + 5 nav links + CTA stop
   fitting comfortably; below this we collapse to logo + hamburger.
   ---------------------------------------------------------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .masthead-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem var(--gutter);
    gap: 0.75rem;
  }
  .logo-link { justify-content: flex-start; gap: 0.45rem; }
  .logo-name { font-size: 0.95rem; letter-spacing: 0; }
  .logo-sub { font-size: 0.55rem; }
}
@media (max-width: 1024px) {
  /* legacy block — kept empty so nothing depends on it */
}
@media (max-width: 820px) {
  /* Verify buttons: keep all three on one row */
  .verify-buttons { gap: 0.45rem; flex-wrap: nowrap; }
  .verify-btn {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    padding: 0.5rem 0.7rem 0.5rem 0.6rem;
    gap: 0.45rem;
  }
  .verify-btn img { width: 15px; height: 15px; }
  /* Author card: stack portrait above text */
  .author-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
  }
  .author-portrait {
    margin-left: auto;
    margin-right: auto;
  }
  .author-more { justify-content: center; }
}
@media (max-width: 820px) {
  .topstrip-address { display: none; }
  .topstrip-inner { gap: 0.8rem 1.4rem; padding-top: 0.55rem; padding-bottom: 0.55rem; }
  .masthead-inner {
    padding: 0.65rem 0.75rem;
    gap: 0.6rem;
  }
  .logo-name { font-size: 0.78rem; }
  .logo-sub { display: none; }
  /* keep chapter nav horizontal — stack number above title, centered */
  .chapter-inner { gap: 0; padding: 0; }
  .chapter {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 0.55rem 0 0.4rem !important;
    min-height: 52px;
    gap: 0.25rem;
  }
  .chapter:not(:first-child) { padding-left: 0 !important; }
  .chapter:first-child { padding-left: 0 !important; }
  .chapter-num { font-size: 0.72rem; min-width: 0; text-align: center; }
  .chapter-title {
    font-size: 0.5rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
  }
  .chapter-sub { display: none; }
  .chapter.is-active::after { left: 0; right: 0; }
}
@media (max-width: 560px) {
  .chapter { padding: 0.6rem 0.4rem; }
  .chapter-title { font-size: 0.54rem; letter-spacing: 0.04em; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-art-frame {
    aspect-ratio: 819 / 950; /* match the image's natural ratio — no crop */
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }
  /* Scroll-driven roll-in: JS sets --hero-roll on .hero-art on scroll.
     0 = off-screen right, 1 = fully in place. */
  .hero-art {
    --hero-roll: 0;
    transform: translateX(calc((1 - var(--hero-roll)) * 110%));
    opacity: var(--hero-roll);
    will-change: transform, opacity;
  }
  @media (prefers-reduced-motion: reduce) {
    .hero-art {
      transform: none;
      opacity: 1;
    }
  }
  .cta-inner { grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .topstrip-contact { gap: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition: none !important; }
}
